#include <iostream>
using namespace std;


// 定义Flyable接口
class Flyable {
public:
    virtual void Gotofly() = 0;
    virtual ~Flyable() {}
};

// Bird类
class Bird : public Flyable {
private:
    double height;
    double speed;

public:
    Bird(double height, double speed) : height(height), speed(speed) {}
    void Gotofly() override {
        cout << "This bird is flying." << endl;
        cout << "Height: " << height << "m." << endl;
        cout << "Speed: " << speed << "m/s." << endl;
        cout << endl;
    }
};

// Plane类
class Plane : public Flyable {
private:
    int loadman;
    double flightcover;

public:
    Plane(int loadman, double flightcover) : loadman(loadman), flightcover(flightcover) {}
    void Gotofly() override {
        cout << "This plane is flying." << endl;
        cout << "There is a number of " << loadman << " passenger(s) on the plane." << endl;
        cout << "It has got a flight of " << flightcover << "km." << endl;
        cout << endl;
    }
};

// Drone类
class Drone : public Flyable {
private:
    double time;
    string photo;

public:
    Drone(double time, string photo) : time(time), photo(photo) {}
    void Gotofly() override {
        cout << "This Drone is flying." << endl;
        cout << "It can run for " << time << " hours." << endl;
        cout << "It is taking photos of " << photo << "." << endl;
        cout << endl;
    }
};

// Superman类
class Superman {
private:
    string name;
    int status;

public:
    Superman(string name) : name(name), status(0) {
        cout << name << " is coming!" << endl;
    }
    void transform(int new_status) {
        status = (new_status >= 2) ? new_status - 2 : new_status + 1;
    }
    void TestStatus() {
        if (status == 0)
            cout << "Human model!" << endl;
        else if (status == 1)
            cout << "Super model!" << endl;
        else
            cout << "The world has been saved!!!" << endl;
        cout << endl;
    }
};

int main() {
    Bird bird(1.41, 5.23);
    bird.Gotofly();

    Plane plane(239, 989);
    plane.Gotofly();

    Drone drone(12.5, "Morning Island");
    drone.Gotofly();

    int a = 5;
    Superman IE("IE");
    IE.transform(a);
    IE.TestStatus();

    return 0;
}
